package com.zonski.jbots.engine.entity;

import com.zonski.jbots.engine.Engine;
import com.zonski.jbots.engine.CollisionData;

/**
 * Interface for artificial (and human) intelligence in the game,
 * typically the mind will be associated with an entity in the
 * game
 */
public interface Mind
{
    /**
     * Updates state of the mind
     */
    void update(Engine engine)
        throws Exception;

    /**
     * Indicates that a collision has occurred, the 
     * mind gets a chance to react here. Should NOT
     * change the position or velocity of the entity
     */
    void collision(Engine engine, CollisionData collision);

    /**
     * Creates a copy of this mind
     * @return a perfect copy of the mind
     */
    Mind copy();
}
